const configure = {
  state: {
    changeSwitch: false, //护眼模式
  },
  getters: {
    changeSwitch: state => {
      let changeSwitch = state.changeSwitch
      if (!changeSwitch) {
        changeSwitch = JSON.parse(window.sessionStorage.getItem('changeSwitch'))
      }
      return changeSwitch
    }

  },
  mutations: {
    setChangeSwitch: (state, changeSwitch) => {
      state.changeSwitch = changeSwitch
      window.sessionStorage.setItem('changeSwitch', JSON.stringify(changeSwitch))
    }
  }
}

export default configure
